<template>
<div class="header">
   <div class="header-left">
     <div class="iconfont back-icon">&#xe624;</div>
   </div>
   <div class="header-input">
     <span class="iconfont">&#xe632;</span>
     输入城市/景点/游玩主题
   </div>
   <router-link to="/city">
    <div class="header-right">
      <span class="city-name">
        {{this.fillterCityname}}
        <span class="iconfont arrow-icon">&#xe64a;</span>
      </span>
    </div>
   </router-link>
</div>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
export default{
  name: 'HomeHeader',
  computed: {
    ...mapState(['city']),
    ...mapGetters(['fillterCityname'])
  }
}
</script>
<style lang="stylus" scoped>
@import '~styles/varibles.styl'
@import '~styles/mixin.styl'
.header
  color: #fff
  display: flex
  line-height: 0.86rem
  background $bgColor
  .header-left
    float: left
    width: 0.64rem
    .back-icon
      text-align center
      font-size 0.36rem
  .header-input
    background #fff
    padding-left .2rem
    color #ccc
    margin-left .2rem
    margin-top 0.12rem
    height 0.62rem
    line-height 0.62rem
    flex: 1
    float: left
    border-radius 0.1rem
  .header-right
    float: right
    text-align center
    color #fff
    .city-name
      padding 0 .22rem
      .arrow-icon
        margin-left -.04rem
        font-size 0.24rem
        margin-right .04rem
</style>
